<html>
<head><meta charset="utf-8"><title>Fix the path attribute on mod items from the language per... · t-lang · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/index.html">t-lang</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Fix.20the.20path.20attribute.20on.20mod.20items.20from.20the.20language.20per.2E.2E.2E.html">Fix the path attribute on mod items from the language per...</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="195929517"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Fix%20the%20path%20attribute%20on%20mod%20items%20from%20the%20language%20per.../near/195929517" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Fix.20the.20path.20attribute.20on.20mod.20items.20from.20the.20language.20per.2E.2E.2E.html#195929517">(May 01 2020 at 03:52)</a>:</h4>
<p>So there're three "shape"s for a module: 1. single mode: <a href="http://file.rs" title="http://file.rs">file.rs</a>   2. headless mode:  file/   <a href="http://mod.rs" title="http://mod.rs">mod.rs</a> + &lt;submodules&gt;  3. <a href="http://file.rs" title="http://file.rs">file.rs</a> + file/  &lt;submodules&gt;.  </p>
<p>The <code>path</code> attribute supports the traditional two modes(1st+2nd mode). When you specify a file using <code>path</code>. It acts as if that file is the <code>mod.rs</code>, and assumes its submodules live by the side of it. However if your project is using 2018 edition recommended mode (1st+3rd mode), that will become a mess, as the files living by the side it is its sibling modules, not submodules.</p>



<a name="195929752"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Fix%20the%20path%20attribute%20on%20mod%20items%20from%20the%20language%20per.../near/195929752" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Fix.20the.20path.20attribute.20on.20mod.20items.20from.20the.20language.20per.2E.2E.2E.html#195929752">(May 01 2020 at 03:57)</a>:</h4>
<p>The rust issue corresponding to this is <a href="https://github.com/rust-lang/rust/issues/59345" title="https://github.com/rust-lang/rust/issues/59345">https://github.com/rust-lang/rust/issues/59345</a> .</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>